Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spectatord #77

Merged
merged 8 commits into from
Sep 29, 2020
Merged

Use spectatord #77

merged 8 commits into from
Sep 29, 2020

Conversation

dmuino
Copy link
Contributor

@dmuino dmuino commented Sep 28, 2020

Switches from implementing a stateful registry to a registry that sends
all acitivity to a spectatord sidecar. The build only supports bazel
now, and we add a dependency on abseil and asio (removing the
curl/cares/rapidjson/boringssl, etc. dependencies)

Switches from implementing a stateful registry to a registry that sends
all acitivity to a spectatord sidecar. The build only supports bazel
now, and we add a dependency on abseil and asio (removing the
curl/cares/rapidjson/boringssl, etc. dependencies)
Currently the travis build is failing but not giving a lot of detail
about what is causing an exception.
The latest build shows the exception happening because we didn't join a
thread which points to something throwing in one of the test servers
(udp/local)
Diagnosing the joinable thread throwing an exception during the
destructor of the test server
We were missing a virtual destructor for Publisher causing the
TestPublisher instance in our tests to not be destructed properly (the
dtor for Publisher was invoked through the pointer, and not
TestPublisher)
@dmuino dmuino changed the base branch from master to spectatord September 29, 2020 01:14
@dmuino dmuino merged commit 2901bb3 into Netflix:spectatord Sep 29, 2020
@dmuino dmuino deleted the spectatord branch September 29, 2020 01:14
copperlight added a commit that referenced this pull request Dec 2, 2022
* Use spectatord (#77)

Switches from implementing a stateful registry to a registry that sends
all acitivity to a spectatord sidecar. The build only supports bazel
now, and we add a dependency on abseil and asio (removing the
curl/cares/rapidjson/boringssl, etc. dependencies)

* Adds stateless/stateful registries (#78)

A stateless registry is usually used in conjunction with spectatord and
does not require to keep state on the current process. Tests done by
users of this library are greatly simplified if the registry and meters
can be queried though, therefore requiring some local state.

This change adds a way to compose whether the registry will be
stateless/stateful and which publisher will be used to send all updates
in the stateless case.

* Allow the user to pass a logger (#79)

This can be used to customize the verbosity of the spectator logger by
user programs.

Deletes unused source file: registry.cc

* Allow the user to pass a logger (#80)

This can be used to customize the verbosity of the spectator logger by
user programs.

Deletes unused source file: registry.cc

* Update to new spectatord format (#81)

Spectatord payload expects name,tags now instead of name:#tags

* Remove unused files (#82)

These were left due to some merging issue in previous PRs. They're no
longer used.

* Reconnect on errors (#83)


Reconnect when there are errors. Particularly important in the local
socket case where if the daemon becomes unavailable we must re-establish
the connection otherwise all future updates would be lost.

* Support common_tags (#84)

These are tags that will be added to all Ids when they're created using
the registry. This is used for example in the system agents to tag all
metrics with xatlas.process.

* Fix sender when no valid endpoint is configured (#85)

This fixes a problem when the endpoint configured was not valid (i.e.
did not start with `unix:` or `udp:`, and we would end up throwing an
exception due to publisher::sender not being initialized.

* Switch std::string_view to absl::string_view to avoid implicit conversion

Co-authored-by: Daniel Muino <[email protected]>
Co-authored-by: James Mulcahy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant